<!DOCTYPE html>
<html lang="en">
{% load staticfiles %}
{% load my_filters %}
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="{% static 'css/font.css' %}">
    <link rel="stylesheet" href="{% static 'css/xadmin.css' %}">
    <link rel="stylesheet" href="{% static 'css/theme1212.min.css' %}">
    <script type="text/javascript" src="{% static 'lib/layui/layui.js' %}" charset="utf-8"></script>
    <script type="text/javascript" src="{% static 'js/jquery.min.js' %}" charset="utf-8"></script>
    <script type="text/javascript" src="{% static 'lib/jquery.form.js' %}" charset="utf-8"></script>
    <script type="text/javascript" src="{% static 'lib/jquery.cookie.js' %}" charset="utf-8"></script>
    <script type="text/javascript" src="{% static 'js/xadmin.js' %}"></script>
    <title>公众号管理</title>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        {% if gh_info %}
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">公众号信息</div>
                    <div class="layui-card-body ">
                        <table class="layui-table">
                            <tbody>
                            <tr>
                                <th>名称</th>
                                <td>{{ gh_info.nick_name }}</td>
                            </tr>
                            <tr>
                                <th>微信号（可以搜索到公众号）</th>
                                <td>{{ gh_info.alias }}</td>
                            </tr>
                            <tr>
                                <th>原始ID</th>
                                <td>{{ gh_info.user_name }}</td>
                            </tr>
                            <tr>
                                <th>APPID</th>
                                <td>{{ gh_info.app_id }}</td>
                            </tr>
                            <tr>
                                <th>类型</th>
                                <td>{{ gh_info.get_service_type_info_display }}</td>
                            </tr>

                            <tr>
                                <th>已授权权限</th>
                                <td>{{ gh_info.func_info }}</td>
                            </tr>
{#                            <tr>#}
{#                                <th>公众号二维码</th>#}
{#                                <td><a class="" target="_blank" href="{{ gh_info.qrcode_url }}" style="width: 300px;height: 300px;">点击查看</a></td>#}
{#                            </tr>#}
                            </tbody>
                        </table>
                    </div>

                </div>
                <div class="layui-card-header">
                    <button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>删除
                    </button>
                </div>
            </div>
        {% else %}
            <div class="layui-col-md12 layui-card">
                <p style="text-align: center;padding: 10px;font-size: 18px;font-weight: 500"></p>
                <p style="text-align: center;padding: 10px;font-size: 18px;font-weight: 500"></p>
                <p style="text-align: center;padding: 20px;font-size: 18px;font-weight: 500">未绑定微信公众号</p>
                <p style="text-align: center;padding: 20px;">把店铺和微信打通,如果还没有公众号，请前往开通公众号</p>
                <div class="" style="text-align: center;padding: 20px;">
                    <a target="_blank" class="layui-btn layui-btn-normal layui-btn-mini"
                       href="{% url 'open:gh_redirect' shop.id %}?auth_type=1">前往绑定公众号</a>
                    <a target="_blank" href="https://mp.weixin.qq.com" class="layui-btn layui-btn-warm">前往开通公众号</a>
                </div>
            </div>
        {% endif %}
    </div>
</div>
</body>
</html>